<div class="bigtitle">Quản Lý Danh Mục Tỉnh/Tp</div>
<table class='tblcontent' cellspacing='0' cellpadding='0' border='0'>
	<tr>
		<td width="10%">Tỉnh/TP</td>
		<td>
		<select style="width:200px" onchange="f_load_province(this.value)">
			<option value="">[Tất cả]</option>
			<? foreach($province as $row) {?>
				<? if($provinceid == $row->id) {?>
			 	<option value="<?=$row->id?>" selected="selected"><?=$row->name?></option>
				<? } else {?>
				<option value="<?=$row->id?>"><?=$row->name?></option>
			<? } }?>
		</select>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<?=form_open(site_url('list_district'),array('name'=>'frm'),array('hidden_status'=>''))?>			
			<?php
				$dt = new Datagrid();
				$dt->id = $datagrid->id;
				$dt->page = $datagrid->page;
				$dt->pages = $datagrid->pages;
				$dt->setDataSource($datagrid->datasource);				
				$dt->siteurl = site_url('list_district');
				$dt->setColumn('Quận/Huyện','30%');
				$dt->setColumn('Tỉnh/TP','30%');				
				//$dt->setColumn('Sắp Xếp','18%');
				$dt->setColumn('Sắp xếp','10%','center',2,'style="width:40px;text-align:center;"');
				$dt->render();
			?>			
			<?php echo form_close()?>
		</td>
	</tr>
</table>
<script language="javascript">
 function f_load_province(id) 
 {
 	window.location = "<?=base_url().'admin.php/list_district/view/'?>" + id;
 }
</script>